import React, { Component } from 'react';
import { Swiper } from 'antd-mobile';
import "./index.css"
class index extends Component {
    constructor(props){
        super(props);
        this.state = {
            swiperlist:[
                { img:'https://img.zcool.cn/community/011133577f01d80000018c1beee34e.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100' },
                { img:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202003%2F02%2F20200302113531_2sK3v.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1690455992&t=70ae90a802f487b3c8519f327b822218' },
                { img:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Ffe0284e9-2f83-45f0-8e68-948b60a1338b%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1690456193&t=d1b74044eb2c0a72c7c4a9b62ac2ee64' },
            ]
        }
    }
    render() {
        return (
            <Swiper autoplay autoplayInterval={1000} loop>
                {
                    this.state.swiperlist.map((item,index)=>{
                        return (
                            <Swiper.Item key={index}>
                                <img src={item.img} alt="" />
                            </Swiper.Item>
                        )
                    })
                }
            </Swiper>
        );
    }
}

export default index;